<%@ Page Language="vb" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<script  runat="server">
Sub Page_Load(sender As Object, e As EventArgs)		
    	Dim myConnString= ConfigurationSettings.appSettings("conn")
	
    	Dim myConnection As New _
		SqlConnection(myConnString)	
    	Dim myCommand As New SqlCommand()
	myConnection.Open()
	Dim mySelectQuery  = "SELECT * FROM tblItems"
	myCommand.CommandText=mySelectQuery
	myCommand.Connection= myConnection
    	myCommand.CommandTimeOut=15
	Dim myReader As SqlDataReader = _
	myCommand.ExecuteReader()
    	Try
        	While myReader.Read()
            		Response.Write((myReader.GetInt32(0).ToString & _
		 " - " & myReader.GetString(1)))
		Response.Write("<br>")
        	End While
   	Finally     
		myReader.Close()
		myConnection.Close()
	End Try
End Sub
</script>	
